package com.kingdee.eas.mx.imp.scoll.app;

import org.apache.log4j.Logger;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.mx.basedata.enums.StateEnum;
import com.kingdee.eas.mx.imp.scoll.SingleCollectionAcceptanceInfo;

public class SingleCollectionAcceptanceControllerBean extends AbstractSingleCollectionAcceptanceControllerBean
{
    private static Logger logger =
        Logger.getLogger("com.kingdee.eas.mx.imp.scoll.app.SingleCollectionAcceptanceControllerBean");

	protected IObjectPK _save(Context ctx, IObjectValue model)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub
		SingleCollectionAcceptanceInfo scaInfo = (SingleCollectionAcceptanceInfo)model;
		scaInfo.setState(StateEnum.save);
		return super._save(ctx, model);
	}

	protected IObjectPK _submit(Context ctx, IObjectValue model)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub
		SingleCollectionAcceptanceInfo scaInfo = (SingleCollectionAcceptanceInfo)model;
		scaInfo.setState(StateEnum.submit);
		return super._submit(ctx, model);
		
	}


	protected void _unAudit(Context ctx, IObjectValue model)
			throws BOSException {
		// TODO Auto-generated method stub
		super._unAudit(ctx, model);
		SingleCollectionAcceptanceInfo scaInfo = (SingleCollectionAcceptanceInfo)model;
		scaInfo.setState(StateEnum.save);
		try {
			_save(ctx, model);
		} catch (EASBizException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

    
    
}